package com.sskj.finance.presenter;

import com.lzy.okgo.model.Response;
import com.sskj.common.base.HttpData;
import com.sskj.finance.bean.HomeBorrowTransTotal;
import com.sskj.finance.http.HttpConfig;
import com.sskj.finance.ui.activity.DYJKActivity;
import com.sskj.lib.http.JsonCallBack;

import java.util.List;


public class DYJKActivityPresenter extends BasePresenter<DYJKActivity> {


    /**
     * 抵押借贷统计
     *
     * @return
     */
    public void homeBorrowTransTotal() {
        httpService.homeBorrowTransTotal().execute(new JsonCallBack<HttpData<List<HomeBorrowTransTotal>>>(this) {
            @Override
            public void onSuccess(Response<HttpData<List<HomeBorrowTransTotal>>> response) {
                HttpData<List<HomeBorrowTransTotal>> httpData = response.body();
                if (httpData.getStatus() == HttpConfig.OK) {

                    mView.updateUI(httpData.getData());
                }
            }
        });
    }
}
